package com.jichangxiu.dynamic.test.service.impl;

import com.jichangxiu.dynamic.test.entity.Student;
import com.jichangxiu.dynamic.test.mapper.StudentMapper;
import com.jichangxiu.dynamic.test.service.StudentService;
import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.concurrent.Future;

/**
 * @author Jcx
 * @date 2022/11/27 10:19
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class StudentServiceImpl extends BaseServiceImpl<StudentMapper, Student> implements StudentService {

    @Override
    public Future<Boolean> saveStudent(Student student) {
        return new AsyncResult<>(save(student));
    }

}
